package com.basic.business.finance.domain;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.basic.common.core.domain.BaseEntity;
import com.basic.common.utils.StringUtils;
import com.basic.common.utils.uuid.ULID;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 【请填写功能名称】对象 t_money_details
 *
 * @author zhaoxy_jn@163.com
 * @date 2025-07-08
 */
@Getter
@Setter
@ExcelIgnoreUnannotated
public class TPddPayMoneyDetails extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private String id;

    /** 主表id */
    private String mainId;

    /** 收入金额 */
    @ExcelProperty(value = "收入金额（+元）")
    private BigDecimal incomeAmount;

    /** 支出金额 */
    @ExcelProperty(value = "支出金额（-元）")
    private BigDecimal expenditureAmount;

    /** 业务类型 */
    @ExcelProperty(value = "账务类型")
    private String businessType;

    /** 业务类型备注 */
    @ExcelProperty(value = "业务描述")
    private String businessTypeRemark;

    @ExcelProperty(value = "发生时间")
    private Date createTime;

    public void setId(String id) {
        this.id = StringUtils.isNotEmpty(id) ? id : ULID.getId();
    }

    public TPddPayMoneyDetails() {
        this.id = ULID.getId();
    }

    @Override
    public String toString() {
        return "TPddPayMoneyDetails{" +
                "id='" + id + '\'' +
                ", mainId='" + mainId + '\'' +
                ", incomeAmount=" + incomeAmount +
                ", expenditureAmount=" + expenditureAmount +
                ", businessType='" + businessType + '\'' +
                ", businessTypeRemark='" + businessTypeRemark + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
